//引入对应的模块
import Vue from 'vue'
import Vueroute from 'vue-router'


import Home from './../pages/Home/home'
import Hot from '../pages/Home/Hot/Hot'
import Box from './../pages/Home/Children/Box'
import Dress from './../pages/Home/Children/Dress'
import Ele from './../pages/Home/Children/Ele'
import Food from './../pages/Home/Children/Food'
import General from './../pages/Home/Children/General'
import Man from './../pages/Home/Children/Man'
import Shirt from './../pages/Home/Children/Shirt'
import Mbaby from './../pages/Home/Children/Mbaby'

import Recommend from './../pages/Recommend/recommend'
import Search from './../pages/Search/search'
import Chat from './../pages/Chat/chat'
import Me from './../pages/Me/me'

//2.声明使用
Vue.use(Vueroute)

//3.输出
export default  new Vueroute({
  //3.1配置一级路由
  routes:[
      {
      path:'/home',
      component:Home,
        children:[
          //热门
          {
            path:'hot',
            component:Hot
          },
          {
            path:'hot',
            component:Hot
          },
          {
            path:'box',
            component:Box
          },
          {
            path:'dress',
            component:Dress
          },
          {
            path:'ele',
            component:Ele
          },
          {
            path:'food',
            component:Food
          },
          {
            path:'general',
            component:General
          },
          {
            path:'man',
            component:Man
          },
          {
            path:'shirt',
            component:Shirt
          },
          {
            path:'mbaby',
            component:Mbaby
          },
          {
            path:'/home',
            redirect:'/home/hot'
          }
        ]
    },
    {
      path:'/recommend',
      component:Recommend
    },
    {
      path:'/search',
      component:Search
    },
    {
      path:'/chat',
      component:Chat
    },
    {
      path:'/me',
      component:Me
    },
    {
      path:'/',
      redirect:'/home'
    }
    ]
})
